language: php

sudo: false

php:
  - 5.5
  - 5.6
  - 7.0
  - hhvm

env:
  PREFER_LOWEST=""

matrix:
  fast_finish: true
  include:
    - php: 5.5
      env: PREFER_LOWEST="--prefer-lowest"

before_script:
  - composer update --no-interaction $PREFER_LOWEST
  - if [ -n "$PREFER_LOWEST" ];then composer update phpunit/phpunit --prefer-source --no-interaction --with-dependencies;fi
script:
  - make test
  - if [ $(phpenv version-name) = 'hhvm' ]; then echo 'No coverage available in env'; else make scrutinizer; fi
  - make clean
